package conMgr.prog.tests;

import java.util.ArrayList;
import java.util.List;

import conMgr.prog.ErrorListener;

public class MockErrorListener implements ErrorListener
{
	final List<Error> errors;
	
	public MockErrorListener()
	{
		errors = new ArrayList<Error>();
	}
	
	@Override
	public void errorOccurred(String description, Exception e)
	{
		Error error = new Error();
		error.description = description;
		error.e = e;
		errors.add(error);
	}
	
	public List<Error> errors()
	{
		return errors;
	}
	
	public class Error
	{
		public String description;
		public Exception e;
	}
}
